<script setup lang="ts">
import { onMounted, ref } from "vue";

onMounted(() => {});
interface SelectOption {
  label: string;
  value: string;
}
// 声明 props 类型
export interface writeValueProps {
  formInline: {
    dataPointName: string;
    dataPointValue: string;
    newPointValue: string;
  };
}

// 声明 props 默认值
const props = withDefaults(defineProps<writeValueProps>(), {
  formInline: () => ({
    dataPointName: "",
    dataPointValue: "",
    newPointValue: ""
  })
});

const newFormInline = ref(props.formInline);
</script>

<template>
  <el-form :model="newFormInline" class="add_form">
    数据点名称{{ newFormInline }}
    <el-form-item>
      <el-input
        v-model="newFormInline.newPointValue"
        type="input"
        class="!w-[220px]"
        :placeholder="newFormInline.dataPointValue"
      />
    </el-form-item>
  </el-form>
</template>
<style lang="scss" scoped>
.add_form :deep(.el-form-item__label) {
  width: 130px !important;
}
</style>
